package com.example.mall.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.util.Date;

import java.io.Serializable;

/**
 * <p>
 * 操作日志表
 * </p>
 *
 * @author whale
 * @since 2025-05-16
 */
@TableName("tb_operation_logs")
public class OperationLogs extends Model<OperationLogs> {

    private static final long serialVersionUID = 1L;

    /**
     * 操作日志唯一标识
     */
    @TableId("operation_id")
    private Long operationId;
    /**
     * 操作用户ID（关联用户表）
     */
    @TableField("user_id")
    private Long userId;
    /**
     * 操作类型（如登录、下单、退款）
     */
    @TableField("operation_type")
    private String operationType;
    /**
     * 操作详情
     */
    @TableField("operation_detail")
    private String operationDetail;
    /**
     * 操作IP地址
     */
    @TableField("ip_address")
    private String ipAddress;
    /**
     * 操作时间
     */
    @TableField("created_date")
    private Date createdDate;


    public Long getOperationId() {
        return operationId;
    }

    public void setOperationId(Long operationId) {
        this.operationId = operationId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getOperationType() {
        return operationType;
    }

    public void setOperationType(String operationType) {
        this.operationType = operationType;
    }

    public String getOperationDetail() {
        return operationDetail;
    }

    public void setOperationDetail(String operationDetail) {
        this.operationDetail = operationDetail;
    }

    public String getIpAddress() {
        return ipAddress;
    }

    public void setIpAddress(String ipAddress) {
        this.ipAddress = ipAddress;
    }

    public Date getCreatedDate() {
        return createdDate;
    }

    public void setCreatedDate(Date createdDate) {
        this.createdDate = createdDate;
    }


    @Override
    public String toString() {
        return "OperationLogs{" +
        ", operationId=" + operationId +
        ", userId=" + userId +
        ", operationType=" + operationType +
        ", operationDetail=" + operationDetail +
        ", ipAddress=" + ipAddress +
        ", createdDate=" + createdDate +
        "}";
    }
}
